home *** CD-ROM | disk | FTP | other *** search
/ Planet Source Code Jumbo …e CD Visual Basic 1 to 7 / 1_2002.ISO / Data / Zips / Graphical 187284232001.psc / Form1.frm (.txt) < prev    next >
Encoding:
Visual Basic Form  |  2001-04-23  |  42.7 KB  |  1,552 lines

  1. VERSION 5.00
  2. Begin VB.Form Form1 
  3.    BackColor       =   &H00404000&
  4.    BorderStyle     =   1  'Fixed Single
  5.    Caption         =   "Graphical Calculator"
  6.    ClientHeight    =   6000
  7.    ClientLeft      =   45
  8.    ClientTop       =   615
  9.    ClientWidth     =   3615
  10.    Icon            =   "Form1.frx":0000
  11.    LinkTopic       =   "Form1"
  12.    MaxButton       =   0   'False
  13.    MinButton       =   0   'False
  14.    ScaleHeight     =   6000
  15.    ScaleWidth      =   3615
  16.    StartUpPosition =   2  'CenterScreen
  17.    Begin VB.CommandButton Command54 
  18.       BackColor       =   &H00008080&
  19.       Caption         =   "Clear Graph"
  20.       Height          =   255
  21.       Left            =   2400
  22.       Style           =   1  'Graphical
  23.       TabIndex        =   74
  24.       Top             =   1680
  25.       Width           =   1095
  26.    End
  27.    Begin VB.TextBox SubYinput 
  28.       Height          =   285
  29.       Left            =   2400
  30.       TabIndex        =   71
  31.       Text            =   "50"
  32.       Top             =   880
  33.       Width           =   375
  34.    End
  35.    Begin VB.TextBox SubXinput 
  36.       Height          =   285
  37.       Left            =   2400
  38.       TabIndex        =   70
  39.       Text            =   "50"
  40.       Top             =   440
  41.       Width           =   375
  42.    End
  43.    Begin VB.CommandButton Command53 
  44.       BackColor       =   &H00008080&
  45.       Caption         =   "Plot"
  46.       Height          =   255
  47.       Left            =   2520
  48.       Style           =   1  'Graphical
  49.       TabIndex        =   69
  50.       Top             =   1320
  51.       Width           =   855
  52.    End
  53.    Begin VB.CommandButton Command52 
  54.       BackColor       =   &H00400040&
  55.       Caption         =   "Power Off"
  56.       Height          =   400
  57.       Left            =   3000
  58.       Style           =   1  'Graphical
  59.       TabIndex        =   68
  60.       Top             =   5565
  61.       Width           =   615
  62.    End
  63.    Begin VB.PictureBox Graph 
  64.       AutoRedraw      =   -1  'True
  65.       BackColor       =   &H00404040&
  66.       ForeColor       =   &H000000FF&
  67.       Height          =   1800
  68.       Left            =   120
  69.       ScaleHeight     =   1740
  70.       ScaleWidth      =   1740
  71.       TabIndex        =   67
  72.       Top             =   120
  73.       Width           =   1800
  74.    End
  75.    Begin VB.OptionButton Option2 
  76.       BackColor       =   &H00404000&
  77.       Caption         =   "Radians"
  78.       ForeColor       =   &H00C0FFC0&
  79.       Height          =   255
  80.       Left            =   1200
  81.       TabIndex        =   66
  82.       Top             =   2400
  83.       Width           =   1215
  84.    End
  85.    Begin VB.OptionButton Option1 
  86.       BackColor       =   &H00004000&
  87.       Caption         =   "Degrees"
  88.       ForeColor       =   &H00C0FFC0&
  89.       Height          =   255
  90.       Left            =   120
  91.       TabIndex        =   65
  92.       Top             =   2400
  93.       Width           =   975
  94.    End
  95.    Begin VB.CommandButton Command51 
  96.       BackColor       =   &H00C0C0C0&
  97.       Caption         =   "abc"
  98.       Height          =   255
  99.       Left            =   1320
  100.       Style           =   1  'Graphical
  101.       TabIndex        =   64
  102.       Top             =   5640
  103.       Width           =   495
  104.    End
  105.    Begin VB.CommandButton Command50 
  106.       Appearance      =   0  'Flat
  107.       BackColor       =   &H00C0C0C0&
  108.       Caption         =   "Tan"
  109.       Height          =   255
  110.       Left            =   1920
  111.       Style           =   1  'Graphical
  112.       TabIndex        =   63
  113.       Top             =   5280
  114.       Width           =   495
  115.    End
  116.    Begin VB.CommandButton Command49 
  117.       BackColor       =   &H00C0C0C0&
  118.       Caption         =   "Cos"
  119.       Height          =   255
  120.       Left            =   1320
  121.       Style           =   1  'Graphical
  122.       TabIndex        =   62
  123.       Top             =   5280
  124.       Width           =   495
  125.    End
  126.    Begin VB.CommandButton Command48 
  127.       BackColor       =   &H00C0C0C0&
  128.       Caption         =   "Sin"
  129.       Height          =   255
  130.       Left            =   720
  131.       Style           =   1  'Graphical
  132.       TabIndex        =   61
  133.       Top             =   5280
  134.       Width           =   495
  135.    End
  136.    Begin VB.CommandButton Command44 
  137.       BackColor       =   &H00C0C0C0&
  138.       Caption         =   "Hyp"
  139.       Height          =   255
  140.       Left            =   2520
  141.       Style           =   1  'Graphical
  142.       TabIndex        =   60
  143.       Top             =   5280
  144.       Width           =   495
  145.    End
  146.    Begin VB.CommandButton Command43 
  147.       BackColor       =   &H00C0C0C0&
  148.       Caption         =   "Sgn"
  149.       Height          =   255
  150.       Left            =   120
  151.       Style           =   1  'Graphical
  152.       TabIndex        =   59
  153.       Top             =   5640
  154.       Width           =   495
  155.    End
  156.    Begin VB.CommandButton Command42 
  157.       BackColor       =   &H00C0C0C0&
  158.       Caption         =   "Rnd"
  159.       Height          =   255
  160.       Left            =   2520
  161.       Style           =   1  'Graphical
  162.       TabIndex        =   58
  163.       Top             =   4920
  164.       Width           =   495
  165.    End
  166.    Begin VB.CommandButton Command47 
  167.       BackColor       =   &H00C0C0C0&
  168.       Caption         =   "Fix"
  169.       Height          =   255
  170.       Left            =   3120
  171.       Style           =   1  'Graphical
  172.       TabIndex        =   57
  173.       Top             =   4920
  174.       Width           =   495
  175.    End
  176.    Begin VB.CommandButton Command46 
  177.       BackColor       =   &H00C0C0C0&
  178.       Caption         =   "Int"
  179.       Height          =   255
  180.       Left            =   3120
  181.       Style           =   1  'Graphical
  182.       TabIndex        =   56
  183.       Top             =   5280
  184.       Width           =   495
  185.    End
  186.    Begin VB.CommandButton Command45 
  187.       BackColor       =   &H00C0C0C0&
  188.       Caption         =   "Abs"
  189.       Height          =   255
  190.       Left            =   720
  191.       Style           =   1  'Graphical
  192.       TabIndex        =   55
  193.       Top             =   5640
  194.       Width           =   495
  195.    End
  196.    Begin VB.CommandButton Command41 
  197.       BackColor       =   &H00C0C0C0&
  198.       Caption         =   "Dec"
  199.       Height          =   255
  200.       Left            =   120
  201.       Style           =   1  'Graphical
  202.       TabIndex        =   54
  203.       Top             =   5280
  204.       Width           =   495
  205.    End
  206.    Begin VB.CommandButton Command40 
  207.       BackColor       =   &H00C0C0C0&
  208.       Caption         =   "x4"
  209.       Height          =   255
  210.       Left            =   3120
  211.       Style           =   1  'Graphical
  212.       TabIndex        =   53
  213.       Top             =   4200
  214.       Width           =   495
  215.    End
  216.    Begin VB.Timer Timer4 
  217.       Interval        =   1000
  218.       Left            =   600
  219.       Top             =   2280
  220.    End
  221.    Begin VB.CommandButton Command39 
  222.       BackColor       =   &H00C0C0C0&
  223.       Caption         =   "Mod"
  224.       Height          =   255
  225.       Left            =   1920
  226.       Style           =   1  'Graphical
  227.       TabIndex        =   51
  228.       Top             =   4920
  229.       Width           =   495
  230.    End
  231.    Begin VB.CommandButton Command38 
  232.       BackColor       =   &H00C0C0C0&
  233.       Caption         =   "1/x"
  234.       Height          =   255
  235.       Left            =   720
  236.       Style           =   1  'Graphical
  237.       TabIndex        =   50
  238.       Top             =   4920
  239.       Width           =   495
  240.    End
  241.    Begin VB.CommandButton Command37 
  242.       BackColor       =   &H00C0C0C0&
  243.       Caption         =   "0."
  244.       Height          =   255
  245.       Left            =   120
  246.       Style           =   1  'Graphical
  247.       TabIndex        =   49
  248.       Top             =   4920
  249.       Width           =   495
  250.    End
  251.    Begin VB.CommandButton Command36 
  252.       BackColor       =   &H00C0C0C0&
  253.       Caption         =   "CE"
  254.       Height          =   255
  255.       Left            =   3120
  256.       Style           =   1  'Graphical
  257.       TabIndex        =   48
  258.       Top             =   3120
  259.       Width           =   495
  260.    End
  261.    Begin VB.Timer Timer3 
  262.       Interval        =   1000
  263.       Left            =   840
  264.       Top             =   2280
  265.    End
  266.    Begin VB.CommandButton Command35 
  267.       BackColor       =   &H00E0E0E0&
  268.       Caption         =   "+/-"
  269.       Height          =   255
  270.       Left            =   120
  271.       Style           =   1  'Graphical
  272.       TabIndex        =   43
  273.       Top             =   3840
  274.       Width           =   495
  275.    End
  276.    Begin VB.CommandButton Command34 
  277.       BackColor       =   &H00C0C0C0&
  278.       Caption         =   "Diam"
  279.       Height          =   255
  280.       Left            =   2520
  281.       Style           =   1  'Graphical
  282.       TabIndex        =   42
  283.       Top             =   4560
  284.       Width           =   495
  285.    End
  286.    Begin VB.CommandButton Command33 
  287.       BackColor       =   &H00C0C0C0&
  288.       Caption         =   "Radi"
  289.       Height          =   255
  290.       Left            =   1920
  291.       Style           =   1  'Graphical
  292.       TabIndex        =   41
  293.       Top             =   4560
  294.       Width           =   495
  295.    End
  296.    Begin VB.CommandButton Command32 
  297.       BackColor       =   &H00C0C0C0&
  298.       Caption         =   "n!"
  299.       Height          =   255
  300.       Left            =   1320
  301.       Style           =   1  'Graphical
  302.       TabIndex        =   40
  303.       Top             =   4560
  304.       Width           =   495
  305.    End
  306.    Begin VB.CommandButton Command31 
  307.       BackColor       =   &H00C0C0C0&
  308.       Caption         =   "Not"
  309.       Height          =   255
  310.       Left            =   120
  311.       Style           =   1  'Graphical
  312.       TabIndex        =   39
  313.       Top             =   4200
  314.       Width           =   495
  315.    End
  316.    Begin VB.CommandButton Command30 
  317.       BackColor       =   &H00C0C0C0&
  318.       Caption         =   "log"
  319.       Height          =   255
  320.       Left            =   720
  321.       Style           =   1  'Graphical
  322.       TabIndex        =   37
  323.       Top             =   4560
  324.       Width           =   495
  325.    End
  326.    Begin VB.CommandButton Command29 
  327.       BackColor       =   &H00C0C0C0&
  328.       Caption         =   "%"
  329.       Height          =   255
  330.       Left            =   120
  331.       Style           =   1  'Graphical
  332.       TabIndex        =   35
  333.       Top             =   4560
  334.       Width           =   495
  335.    End
  336.    Begin VB.CommandButton Command28 
  337.       BackColor       =   &H00C0C0C0&
  338.       Caption         =   "Exp"
  339.       Height          =   255
  340.       Left            =   1320
  341.       Style           =   1  'Graphical
  342.       TabIndex        =   34
  343.       Top             =   4200
  344.       Width           =   495
  345.    End
  346.    Begin VB.CommandButton Command27 
  347.       BackColor       =   &H00C0C0C0&
  348.       Caption         =   "sA"
  349.       Height          =   255
  350.       Left            =   720
  351.       Style           =   1  'Graphical
  352.       TabIndex        =   33
  353.       Top             =   4200
  354.       Width           =   495
  355.    End
  356.    Begin VB.CommandButton Command26 
  357.       BackColor       =   &H00C0C0C0&
  358.       Caption         =   "sP"
  359.       Height          =   255
  360.       Left            =   3120
  361.       Style           =   1  'Graphical
  362.       TabIndex        =   32
  363.       Top             =   2760
  364.       Width           =   495
  365.    End
  366.    Begin VB.Timer Timer2 
  367.       Interval        =   1000
  368.       Left            =   1320
  369.       Top             =   2280
  370.    End
  371.    Begin VB.CommandButton Command25 
  372.       BackColor       =   &H00C0C0C0&
  373.       Caption         =   "XoR"
  374.       Height          =   255
  375.       Left            =   2520
  376.       Style           =   1  'Graphical
  377.       TabIndex        =   30
  378.       Top             =   4200
  379.       Width           =   495
  380.    End
  381.    Begin VB.CommandButton Command24 
  382.       BackColor       =   &H00C0C0C0&
  383.       Caption         =   "CTK"
  384.       Height          =   255
  385.       Left            =   1920
  386.       Style           =   1  'Graphical
  387.       TabIndex        =   28
  388.       Top             =   4200
  389.       Width           =   495
  390.    End
  391.    Begin VB.CommandButton Command23 
  392.       BackColor       =   &H00C0C0C0&
  393.       Caption         =   "cC"
  394.       Height          =   255
  395.       Left            =   2520
  396.       Style           =   1  'Graphical
  397.       TabIndex        =   27
  398.       Top             =   3840
  399.       Width           =   495
  400.    End
  401.    Begin VB.CommandButton Command22 
  402.       BackColor       =   &H00C0C0C0&
  403.       Caption         =   "cA"
  404.       Height          =   255
  405.       Left            =   2520
  406.       Style           =   1  'Graphical
  407.       TabIndex        =   26
  408.       Top             =   3480
  409.       Width           =   495
  410.    End
  411.    Begin VB.CommandButton Command21 
  412.       BackColor       =   &H00C0C0C0&
  413.       Caption         =   "Pi"
  414.       Height          =   255
  415.       Left            =   1320
  416.       Style           =   1  'Graphical
  417.       TabIndex        =   25
  418.       Top             =   4920
  419.       Width           =   495
  420.    End
  421.    Begin VB.CommandButton Command20 
  422.       BackColor       =   &H00C0C0C0&
  423.       Caption         =   "x3"
  424.       Height          =   255
  425.       Left            =   3120
  426.       Style           =   1  'Graphical
  427.       TabIndex        =   24
  428.       Top             =   3840
  429.       Width           =   495
  430.    End
  431.    Begin VB.CommandButton Command19 
  432.       BackColor       =   &H00C0C0C0&
  433.       Caption         =   "x2"
  434.       Height          =   255
  435.       Left            =   3120
  436.       Style           =   1  'Graphical
  437.       TabIndex        =   23
  438.       Top             =   3480
  439.       Width           =   495
  440.    End
  441.    Begin VB.CommandButton Command18 
  442.       BackColor       =   &H00C0C0C0&
  443.       Caption         =   "Sqrt"
  444.       Height          =   255
  445.       Left            =   3120
  446.       Style           =   1  'Graphical
  447.       TabIndex        =   22
  448.       Top             =   4560
  449.       Width           =   495
  450.    End
  451.    Begin VB.CommandButton Command17 
  452.       BackColor       =   &H00C0C0C0&
  453.       Caption         =   "C"
  454.       Height          =   255
  455.       Left            =   2520
  456.       Style           =   1  'Graphical
  457.       TabIndex        =   21
  458.       Top             =   3120
  459.       Width           =   495
  460.    End
  461.    Begin VB.CommandButton Command16 
  462.       BackColor       =   &H00E0E0E0&
  463.       Caption         =   "."
  464.       Height          =   255
  465.       Left            =   1320
  466.       Style           =   1  'Graphical
  467.       TabIndex        =   20
  468.       Top             =   3840
  469.       Width           =   495
  470.    End
  471.    Begin VB.CommandButton Command15 
  472.       BackColor       =   &H00E0E0E0&
  473.       Caption         =   "0"
  474.       Height          =   255
  475.       Left            =   720
  476.       Style           =   1  'Graphical
  477.       TabIndex        =   17
  478.       Top             =   3840
  479.       Width           =   495
  480.    End
  481.    Begin VB.CommandButton Command14 
  482.       BackColor       =   &H00E0E0E0&
  483.       Caption         =   "/"
  484.       Height          =   255
  485.       Left            =   1920
  486.       Style           =   1  'Graphical
  487.       TabIndex        =   16
  488.       Top             =   3840
  489.       Width           =   495
  490.    End
  491.    Begin VB.CommandButton Command13 
  492.       BackColor       =   &H00004000&
  493.       Caption         =   "="
  494.       Height          =   255
  495.       Left            =   2520
  496.       Style           =   1  'Graphical
  497.       TabIndex        =   15
  498.       Top             =   2760
  499.       Width           =   495
  500.    End
  501.    Begin VB.CommandButton Command12 
  502.       BackColor       =   &H00E0E0E0&
  503.       Caption         =   "X"
  504.       Height          =   255
  505.       Left            =   1920
  506.       Style           =   1  'Graphical
  507.       TabIndex        =   14
  508.       Top             =   3480
  509.       Width           =   495
  510.    End
  511.    Begin VB.CommandButton Command11 
  512.       BackColor       =   &H00E0E0E0&
  513.       Caption         =   "-"
  514.       Height          =   255
  515.       Left            =   1920
  516.       Style           =   1  'Graphical
  517.       TabIndex        =   12
  518.       Top             =   3120
  519.       Width           =   495
  520.    End
  521.    Begin VB.CommandButton Command10 
  522.       BackColor       =   &H00E0E0E0&
  523.       Caption         =   "+"
  524.       Height          =   255
  525.       Left            =   1920
  526.       Style           =   1  'Graphical
  527.       TabIndex        =   11
  528.       Top             =   2760
  529.       Width           =   495
  530.    End
  531.    Begin VB.CommandButton Command9 
  532.       BackColor       =   &H00E0E0E0&
  533.       Caption         =   "9"
  534.       Height          =   255
  535.       Left            =   1320
  536.       Style           =   1  'Graphical
  537.       TabIndex        =   10
  538.       Top             =   3480
  539.       Width           =   495
  540.    End
  541.    Begin VB.CommandButton Command8 
  542.       BackColor       =   &H00E0E0E0&
  543.       Caption         =   "8"
  544.       Height          =   255
  545.       Left            =   720
  546.       Style           =   1  'Graphical
  547.       TabIndex        =   9
  548.       Top             =   3480
  549.       Width           =   495
  550.    End
  551.    Begin VB.CommandButton Command7 
  552.       BackColor       =   &H00E0E0E0&
  553.       Caption         =   "7"
  554.       Height          =   255
  555.       Left            =   120
  556.       Style           =   1  'Graphical
  557.       TabIndex        =   8
  558.       Top             =   3480
  559.       Width           =   495
  560.    End
  561.    Begin VB.CommandButton Command6 
  562.       BackColor       =   &H00E0E0E0&
  563.       Caption         =   "6"
  564.       Height          =   255
  565.       Left            =   1320
  566.       Style           =   1  'Graphical
  567.       TabIndex        =   7
  568.       Top             =   3120
  569.       Width           =   495
  570.    End
  571.    Begin VB.CommandButton Command5 
  572.       BackColor       =   &H00E0E0E0&
  573.       Caption         =   "5"
  574.       Height          =   255
  575.       Left            =   720
  576.       Style           =   1  'Graphical
  577.       TabIndex        =   6
  578.       Top             =   3120
  579.       Width           =   495
  580.    End
  581.    Begin VB.CommandButton Command4 
  582.       BackColor       =   &H00E0E0E0&
  583.       Caption         =   "4"
  584.       Height          =   255
  585.       Left            =   120
  586.       Style           =   1  'Graphical
  587.       TabIndex        =   5
  588.       Top             =   3120
  589.       Width           =   495
  590.    End
  591.    Begin VB.CommandButton Command3 
  592.       BackColor       =   &H00E0E0E0&
  593.       Caption         =   "3"
  594.       Height          =   255
  595.       Left            =   1320
  596.       Style           =   1  'Graphical
  597.       TabIndex        =   4
  598.       Top             =   2760
  599.       Width           =   495
  600.    End
  601.    Begin VB.CommandButton Command2 
  602.       BackColor       =   &H00E0E0E0&
  603.       Caption         =   "2"
  604.       Height          =   255
  605.       Left            =   720
  606.       Style           =   1  'Graphical
  607.       TabIndex        =   3
  608.       Top             =   2760
  609.       Width           =   495
  610.    End
  611.    Begin VB.CommandButton Command1 
  612.       BackColor       =   &H00E0E0E0&
  613.       Caption         =   "1"
  614.       Height          =   255
  615.       Left            =   120
  616.       Style           =   1  'Graphical
  617.       TabIndex        =   2
  618.       Top             =   2760
  619.       Width           =   495
  620.    End
  621.    Begin VB.TextBox Text1 
  622.       BackColor       =   &H00808000&
  623.       BeginProperty Font 
  624.          Name            =   "MS Sans Serif"
  625.          Size            =   8.25
  626.          Charset         =   0
  627.          Weight          =   700
  628.          Underline       =   0   'False
  629.          Italic          =   0   'False
  630.          Strikethrough   =   0   'False
  631.       EndProperty
  632.       ForeColor       =   &H00FFFF00&
  633.       Height          =   285
  634.       Left            =   120
  635.       TabIndex        =   1
  636.       Top             =   2040
  637.       Width           =   3495
  638.    End
  639.    Begin VB.Label Label15 
  640.       BackStyle       =   0  'Transparent
  641.       Caption         =   "Y = Y +               * Sin(b * 3 * 20)"
  642.       BeginProperty Font 
  643.          Name            =   "MS Serif"
  644.          Size            =   6.75
  645.          Charset         =   0
  646.          Weight          =   400
  647.          Underline       =   0   'False
  648.          Italic          =   0   'False
  649.          Strikethrough   =   0   'False
  650.       EndProperty
  651.       ForeColor       =   &H00E0E0E0&
  652.       Height          =   255
  653.       Left            =   1920
  654.       TabIndex        =   73
  655.       Top             =   960
  656.       Width           =   1815
  657.    End
  658.    Begin VB.Label Label14 
  659.       BackStyle       =   0  'Transparent
  660.       Caption         =   "X = X +               * Cos(a * 3 * 2)"
  661.       BeginProperty Font 
  662.          Name            =   "MS Serif"
  663.          Size            =   6.75
  664.          Charset         =   0
  665.          Weight          =   400
  666.          Underline       =   0   'False
  667.          Italic          =   0   'False
  668.          Strikethrough   =   0   'False
  669.       EndProperty
  670.       ForeColor       =   &H00E0E0E0&
  671.       Height          =   255
  672.       Left            =   1920
  673.       TabIndex        =   72
  674.       Top             =   480
  675.       Width           =   1815
  676.    End
  677.    Begin VB.Label Label13 
  678.       Caption         =   "0"
  679.       Height          =   495
  680.       Left            =   840
  681.       TabIndex        =   52
  682.       Top             =   4080
  683.       Visible         =   0   'False
  684.       Width           =   1215
  685.    End
  686.    Begin VB.Label Label12 
  687.       Caption         =   "0"
  688.       Height          =   495
  689.       Left            =   1560
  690.       TabIndex        =   47
  691.       Top             =   4800
  692.       Visible         =   0   'False
  693.       Width           =   1215
  694.    End
  695.    Begin VB.Label Label11 
  696.       Caption         =   "0"
  697.       Height          =   495
  698.       Left            =   840
  699.       TabIndex        =   46
  700.       Top             =   3720
  701.       Visible         =   0   'False
  702.       Width           =   1215
  703.    End
  704.    Begin VB.Label Label10 
  705.       Caption         =   "0"
  706.       Height          =   495
  707.       Left            =   840
  708.       TabIndex        =   45
  709.       Top             =   3600
  710.       Visible         =   0   'False
  711.       Width           =   1215
  712.    End
  713.    Begin VB.Label Label9 
  714.       BackStyle       =   0  'Transparent
  715.       Caption         =   "0"
  716.       Height          =   495
  717.       Left            =   600
  718.       TabIndex        =   44
  719.       Top             =   4440
  720.       Visible         =   0   'False
  721.       Width           =   1215
  722.    End
  723.    Begin VB.Label Label8 
  724.       BackStyle       =   0  'Transparent
  725.       Caption         =   "1"
  726.       Height          =   495
  727.       Left            =   840
  728.       TabIndex        =   38
  729.       Top             =   3240
  730.       Visible         =   0   'False
  731.       Width           =   1215
  732.    End
  733.    Begin VB.Label Label7 
  734.       BackStyle       =   0  'Transparent
  735.       Height          =   495
  736.       Left            =   960
  737.       TabIndex        =   36
  738.       Top             =   3240
  739.       Width           =   1215
  740.    End
  741.    Begin VB.Label Label6 
  742.       BackStyle       =   0  'Transparent
  743.       Height          =   495
  744.       Left            =   2400
  745.       TabIndex        =   31
  746.       Top             =   3720
  747.       Width           =   1215
  748.    End
  749.    Begin VB.Label Label5 
  750.       Caption         =   "The computation has been added to memory"
  751.       Height          =   375
  752.       Left            =   0
  753.       TabIndex        =   29
  754.       Top             =   3360
  755.       Visible         =   0   'False
  756.       Width           =   2895
  757.    End
  758.    Begin VB.Label Label4 
  759.       Caption         =   "The Answer Is:"
  760.       Height          =   255
  761.       Left            =   0
  762.       TabIndex        =   19
  763.       Top             =   5640
  764.       Visible         =   0   'False
  765.       Width           =   1095
  766.    End
  767.    Begin VB.Label Label3 
  768.       Caption         =   "0"
  769.       Height          =   255
  770.       Left            =   1080
  771.       TabIndex        =   18
  772.       Top             =   5280
  773.       Visible         =   0   'False
  774.       Width           =   3375
  775.    End
  776.    Begin VB.Label Label2 
  777.       BackStyle       =   0  'Transparent
  778.       Caption         =   "0"
  779.       Height          =   255
  780.       Left            =   1200
  781.       TabIndex        =   13
  782.       Top             =   4920
  783.       Visible         =   0   'False
  784.       Width           =   2415
  785.    End
  786.    Begin VB.Label Label1 
  787.       Caption         =   "0"
  788.       Height          =   495
  789.       Left            =   2280
  790.       TabIndex        =   0
  791.       Top             =   2880
  792.       Width           =   1215
  793.    End
  794.    Begin VB.Menu File 
  795.       Caption         =   "&File"
  796.       Begin VB.Menu Clear 
  797.          Caption         =   "&Clear"
  798.          Shortcut        =   {F6}
  799.       End
  800.       Begin VB.Menu border2 
  801.          Caption         =   "-"
  802.       End
  803.       Begin VB.Menu Exit 
  804.          Caption         =   "&Exit"
  805.       End
  806.    End
  807.    Begin VB.Menu Edit 
  808.       Caption         =   "&Edit"
  809.       Begin VB.Menu Copy 
  810.          Caption         =   "&Copy"
  811.       End
  812.       Begin VB.Menu Paste 
  813.          Caption         =   "&Paste"
  814.       End
  815.    End
  816.    Begin VB.Menu Help 
  817.       Caption         =   "&Help"
  818.       Begin VB.Menu HelpTopics 
  819.          Caption         =   "&Help Topics"
  820.       End
  821.       Begin VB.Menu border1 
  822.          Caption         =   "-"
  823.       End
  824.       Begin VB.Menu AboutCalculator 
  825.          Caption         =   "&About Calculator"
  826.       End
  827.    End
  828. Attribute VB_Name = "Form1"
  829. Attribute VB_GlobalNameSpace = False
  830. Attribute VB_Creatable = False
  831. Attribute VB_PredeclaredId = True
  832. Attribute VB_Exposed = False
  833. ' Calculator -- Written By Robin McKay
  834. Const Pi As Variant = "3.1415926535897932384626433832795"
  835. Dim n   As Integer
  836. Dim Sum As Variant
  837. Dim dS  As Variant
  838. Dim P1  As Variant
  839. Dim X   As Variant
  840. Dim Lim As Variant
  841. Dim Q As Variant
  842. Dim a As Variant
  843. Dim i  As Integer
  844. Dim Px As Variant
  845. Dim T  As Variant
  846. Dim TicColor As Long
  847. Dim SubX As Long
  848. Dim SubY As Long
  849. Private Sub AboutCalculator_Click()
  850. Form2.Show
  851. End Sub
  852. Private Sub Clear_Click()
  853. Call Command17_Click
  854. End Sub
  855. Private Sub Command1_Click()
  856. Text1.SelText = CDec(1)
  857. End Sub
  858. Private Sub Command10_Click()
  859. On Error Resume Next
  860. If Label1 = 0 Then
  861.     Label1 = 1
  862.     Label2 = 0 + Label2 + Text1
  863.     Text1 = ""
  864.     Label1 = 0
  865. ElseIf Label1 = 1 Then
  866.     Label1 = 0
  867.     Label2 = Label2 - Text1
  868.     Text1 = ""
  869. ElseIf Label1 = 2 Then
  870.     Label2 = Label2 * Text1
  871.     Label1 = 0
  872.     Text1 = ""
  873. ElseIf Label1 = 3 Then
  874.     Label2 = Label2 / Text1
  875.     Label1 = 0
  876.     Text1 = ""
  877. End If
  878. End Sub
  879. Private Sub Command11_Click()
  880. On Error Resume Next
  881. If Label1 = 0 Then
  882.     Label2 = 0 + Label2 + Text1
  883.     Label1 = 1
  884.     Text1 = ""
  885.     Label1 = 1
  886. ElseIf Label1 = 2 Then
  887.     Label2 = Label2 * Text1
  888.     Label1 = 1
  889.     Text1 = ""
  890. ElseIf Label1 = 1 Then
  891.     Label2 = Label2 - Text1
  892.     Text1 = ""
  893. ElseIf Label1 = 3 Then
  894.     Label2 = Label2 / Text1
  895.     Label1 = 1
  896.     Text1 = ""
  897. End If
  898. End Sub
  899. Private Sub Command12_Click()
  900. On Error Resume Next
  901. If Label1 = 0 Then
  902.     Label2 = 0 + Label2 + Text1
  903.     Label1 = 2
  904.     Text1 = ""
  905. ElseIf Label1 = 1 Then
  906.     Label2 = Label2 - Text1
  907.     Label1 = 2
  908.     Text1 = ""
  909. ElseIf Label1 = 2 Then
  910.     Label2 = Label2 * Text1
  911.     Text1 = ""
  912. ElseIf Label1 = 3 Then
  913.     Label2 = Label2 / Text1
  914.     Label1 = 2
  915.     Text1 = ""
  916. End If
  917. End Sub
  918. Private Sub Command13_Click()
  919. On Error Resume Next
  920. If (Label1 = 3) And (Text1 = 0) Then
  921.     Text1 = "ERROR: Cannot divide by zero"
  922.     'Label5.Visible = True
  923.     Timer3.Enabled = True
  924.     'Label12 = 1
  925.     GoTo 10
  926.     Else
  927. End If
  928. Dim i As Integer
  929. If Label1 = 0 Then
  930.     Label2 = 0 + Label2 + Text1
  931.     Label3 = Label2
  932.     Label2 = 0
  933.     Label1 = 0
  934.     Text1 = Label3.Caption
  935. ElseIf Label1 = 1 Then
  936.     Label2 = Label2 - Text1
  937.     Label3 = Label2
  938.     Label1 = 0
  939.     Label2 = 0
  940.     Text1 = Label3.Caption
  941. ElseIf Label1 = 2 Then
  942.     Label2 = Label2 * Text1
  943.     Label3 = Label2
  944.     Label2 = 0
  945.     Label1 = 0
  946.     Text1 = Label3.Caption
  947. ElseIf Label1 = 3 Then
  948.     Label2 = CDec(Label2) / CDec(Text1)
  949.     Label3 = Label2
  950.     Label1 = 0
  951.     Label2 = 0
  952.     Text1 = Label3.Caption
  953. End If
  954. Label8 = 1
  955. End Sub
  956. Private Sub Command14_Click()
  957. On Error Resume Next
  958. If Label1 = 0 Then
  959.     Label2 = 0 + Label2 + Text1
  960.     Label1 = 3
  961.     Text1 = ""
  962. ElseIf Label1 = 1 Then
  963.     Label2 = Label2 - Text1
  964.     Label1 = 3
  965.     Text1 = ""
  966. ElseIf Label1 = 2 Then
  967.     Label2 = Label2 * Text1
  968.     Label1 = 3
  969.     Text1 = ""
  970. ElseIf Label1 = 3 Then
  971.     Label2 = Label2 / Text1
  972.     Text1 = ""
  973. End If
  974. End Sub
  975. Private Sub Command15_Click()
  976. ' Handles division by Zero
  977. Text1.SelText = 0
  978. 'If (Label1 = 3) And (Text1 = 0) Then
  979.     'Label5.Caption = "Cannot divide by Zero"
  980.     'Label5.Visible = True
  981.     'Timer3.Enabled = True
  982.     'Label12 = 1
  983. 'End If
  984. End Sub
  985. Private Sub Command16_Click()
  986. Text1.SelText = "."
  987. End Sub
  988. Private Sub Command17_Click()
  989. On Error Resume Next
  990. If Label12 = 1 Then
  991.     Label1 = 0
  992.     Label3 = 0
  993.     Label2 = 0
  994.     Label10 = 0
  995.     Text1 = ""
  996. ElseIf Label12 = 0 Then
  997.     Label1 = 0
  998.     Label2 = 0
  999.     Label3 = 0
  1000.     Label10 = 0
  1001.     Text1 = ""
  1002. End If
  1003. End Sub
  1004. Private Sub Command18_Click()
  1005. On Error Resume Next
  1006. Text1 = Sqr(Text1)
  1007. End Sub
  1008. Private Sub Command19_Click()
  1009. Text1 = Text1 * Text1
  1010. End Sub
  1011. Private Sub Command2_Click()
  1012. Text1.SelText = CDec(2)
  1013. End Sub
  1014. Private Sub Command20_Click()
  1015. Text1 = Text1 * Text1 * Text1
  1016. End Sub
  1017. Private Sub Command21_Click()
  1018. Text1.Text = Pi
  1019. End Sub
  1020. Private Sub Command22_Click()
  1021. On Error Resume Next
  1022. Text1 = Pi * Text1 * Pi * Text1
  1023. End Sub
  1024. Private Sub Command23_Click()
  1025. On Error Resume Next
  1026. Text1 = 2 * Pi * Text1
  1027. End Sub
  1028. Private Sub Command24_Click()
  1029. On Error Resume Next
  1030. Text1 = Text1 * 1.6
  1031. End Sub
  1032. Private Sub Command25_Click()
  1033. On Error GoTo cancelerr:
  1034. Dim i As Integer
  1035. Dim i2 As Integer
  1036. Dim i3 As Integer
  1037.     i = InputBox("Please enter the highest computation value:", "Highest")
  1038.     i2 = InputBox("Please enter the lowest computation value:", "Lowest")
  1039.     i3 = i - i2
  1040.     Text1 = "The XOR is equal to:"
  1041.     'Label5.Visible = True
  1042.     Label6.Visible = True
  1043.     Label6 = i3
  1044.     Timer2.Enabled = True
  1045. cancelerr:
  1046. Exit Sub
  1047. End Sub
  1048. Private Sub Command26_Click()
  1049. Text1 = 0 + Text1 + Text1 + Text1 + Text1
  1050. End Sub
  1051. Private Sub Command27_Click()
  1052. Text1 = Text1 * Text1
  1053. End Sub
  1054. Private Sub Command28_Click()
  1055. On Error Resume Next
  1056. Text1.SelText = ".e" + "+" + "0"
  1057. End Sub
  1058. Private Sub Command29_Click()
  1059. On Error Resume Next
  1060. ' This performs a percentage calculation
  1061. Text1 = Text1 / 100
  1062. Text1 = Text1 * 100
  1063. Text1.Text = Text1.Text + "%"
  1064. End Sub
  1065. Private Sub Command3_Click()
  1066. Text1.SelText = CDec(3)
  1067. End Sub
  1068. Private Sub Command30_Click()
  1069. On Error Resume Next
  1070. log10 = Log(Text1) / Log(10)
  1071. Text1 = log10
  1072. End Sub
  1073. Private Sub Command31_Click()
  1074. On Error Resume Next
  1075. If Label10 = 0 Then
  1076.     Label10 = Text1.Text
  1077.     Label11 = 1
  1078.     Text1.Text = "-" + Text1.Text - 1
  1079. ElseIf Label11 = 1 Then
  1080.     Text1.Text = Label10
  1081.     Label11 = 0
  1082.     Label10 = 0
  1083. End If
  1084. End Sub
  1085. Private Sub Command32_Click()
  1086. ' This program supports factorial 10
  1087. If Text1 = 1 Then Text1 = 1
  1088. If Text1 = 2 Then Text1 = 2
  1089. If Text1 = 3 Then Text1 = 6
  1090. If Text1 = 4 Then Text1 = 24
  1091. If Text1 = 5 Then Text1 = 120
  1092. If Text1 = 6 Then Text1 = 720
  1093. If Text1 = 7 Then Text1 = 5040
  1094. If Text1 = 8 Then Text1 = 40320
  1095. If Text1 = 9 Then Text1 = 362880
  1096. If Text1 = 10 Then Text1 = 3628800
  1097. End Sub
  1098. Private Sub Command33_Click()
  1099. On Error Resume Next
  1100. Text1 = Text1 / 2
  1101. End Sub
  1102. Private Sub Command34_Click()
  1103. On Error Resume Next
  1104. Text1 = Text1 * 2
  1105. End Sub
  1106. Private Sub Command35_Click()
  1107. ' Use this to toggle plus and minus
  1108. On Error Resume Next
  1109. If Label9.Caption = 0 Then
  1110.     Text1 = Text1 - Text1 - Text1
  1111.     Label9 = 1
  1112. ElseIf Label9 = 1 Then
  1113.     Text1 = Text1 - Text1 - Text1
  1114.     Label9 = 0
  1115. End If
  1116. End Sub
  1117. Private Sub Command36_Click()
  1118. On Error Resume Next
  1119. Text1 = ""
  1120. End Sub
  1121. Private Sub Command37_Click()
  1122. On Error Resume Next
  1123. 'we can't allow "0." to be entered
  1124. 'more than once
  1125. If Text1 Like "*.*" Then Exit Sub
  1126. Text1.SelText = "0."
  1127. End Sub
  1128. Private Sub Command38_Click()
  1129. On Error Resume Next
  1130. Text1 = Text1 / Text1 / Text1
  1131. End Sub
  1132. Private Sub Command39_Click()
  1133. On Error Resume Next
  1134. Dim i As Integer
  1135. Dim i2 As Integer
  1136. Dim i3 As Integer
  1137. Label13 = 0
  1138.     i = InputBox("Please enter the 1st number:", "Number 1")
  1139.     i2 = InputBox("Please enter the 2nd number:", "Number 2")
  1140.     i3 = i Mod i2
  1141.     Label13 = i3
  1142.     Text1 = "The MOD is " + Label13
  1143.     'Label5.Visible = True
  1144.     Label13 = ""
  1145.     Timer4.Enabled = True
  1146. End Sub
  1147. Private Sub Command4_Click()
  1148. Text1.SelText = CDec(4)
  1149. End Sub
  1150. Private Sub Command40_Click()
  1151. On Error Resume Next
  1152. Text1 = Text1 * Text1 * Text1 * Text1
  1153. End Sub
  1154. Private Sub Command41_Click()
  1155. ' A procedure to convert a number to decimal
  1156. On Error Resume Next
  1157. Text1 = Text1 / 100
  1158. End Sub
  1159. Private Sub Command42_Click()
  1160. On Error Resume Next
  1161. Randomize
  1162. Text1 = Rnd(Text1)
  1163. End Sub
  1164. Private Sub Command43_Click()
  1165. On Error Resume Next
  1166. Text1 = Sgn(Text1)
  1167. End Sub
  1168. Private Sub Command44_Click()
  1169. On Error GoTo cancelerr:
  1170. Dim i As Integer
  1171. Dim i2 As Integer
  1172. Dim i3 As Integer
  1173. Dim i4 As Integer
  1174. Dim i5 As Integer
  1175.     i = InputBox("Please enter number:", "1st Number")
  1176.     i2 = InputBox("Please enter number:", "2nd Number")
  1177.     i3 = i * i
  1178.     i4 = i2 * i2
  1179.     i5 = i3 + i4
  1180.     Text1 = Sqr(i5)
  1181. cancelerr:
  1182. Exit Sub
  1183. End Sub
  1184. Private Sub Command45_Click()
  1185. On Error Resume Next
  1186. Text1 = Abs(Text1)
  1187. End Sub
  1188. Private Sub Command46_Click()
  1189. On Error Resume Next
  1190. Text1 = Int(Text1)
  1191. End Sub
  1192. Private Sub Command47_Click()
  1193. On Error Resume Next
  1194. Text1 = Fix(Text1)
  1195. End Sub
  1196. Private Sub Command48_Click()
  1197. ' This works out the sin of a number
  1198. On Error Resume Next
  1199. ' Check for non-numeric input argument
  1200.   If IsNumeric(Text1) = False Then
  1201.      Text1 = "ERROR: Invalid input argument"
  1202.      Beep
  1203.      Exit Sub
  1204.   End If
  1205. 'If Option 1 = true then convert degrees to radians
  1206.   If Option1.Value = True Then
  1207.   Q = CDec(Text1) * Pi / 180
  1208. 'display in radians
  1209. Q = CDec(Text1)
  1210. End If
  1211. ' Compute sine of argument
  1212.   a = SinRad(Q)
  1213.   Text1 = a
  1214. End Sub
  1215. Private Sub Command49_Click()
  1216. ' This works out the cosine of a number
  1217. On Error Resume Next
  1218. ' Check for non-numeric input argument
  1219.   If IsNumeric(Text1) = False Then
  1220.      Text1 = "ERROR: Invalid input argument"
  1221.      Beep
  1222.      Exit Sub
  1223.   End If
  1224. 'If Option 1 = true then convert degrees to radians
  1225. If Option1.Value = True Then
  1226.   Q = CDec(Text1) * Pi / 180
  1227. 'display in radians
  1228. Q = CDec(Text1)
  1229. End If
  1230. ' Compute sine of argument
  1231.   a = CosRad(Q)
  1232.   Text1 = a
  1233. End Sub
  1234. Private Sub Command5_Click()
  1235. Text1.SelText = CDec(5)
  1236. End Sub
  1237. Private Sub Command50_Click()
  1238. ' This works out the tangent of a number
  1239. On Error Resume Next
  1240. ' Check for non-numeric input argument
  1241.   If IsNumeric(Text1) = False Then
  1242.      Text1 = "ERROR: Invalid input argument"
  1243.      Beep
  1244.      Exit Sub
  1245.   End If
  1246. ' Check for infinite result
  1247.   If Abs(Text1) = 90 Or Abs(Text1) = 270 Then
  1248.      Text1 = "Infinite result"
  1249.      Exit Sub
  1250.   End If
  1251. 'If Option 1 = true then convert degrees to radians
  1252.   If Option1.Value = True Then
  1253.   Q = CDec(Text1) * Pi / 180
  1254. 'display in radians
  1255. Q = CDec(Text1)
  1256. End If
  1257. ' Compute tangent of argument
  1258.   a = TanRad(Q)
  1259.   Text1 = a
  1260. End Sub
  1261. Private Sub Command51_Click()
  1262. Form3.Show
  1263. End Sub
  1264. Private Sub Command52_Click()
  1265. Exit_Click
  1266. End Sub
  1267. Private Sub Command53_Click()
  1268. 'set graph window to pixels
  1269. Graph.ScaleMode = 3
  1270. Dim a, b, RandomColor
  1271. 'starting point on graph window
  1272. X = 0
  1273. Y = 50
  1274. 'pick a random color
  1275. RandomColor = QBColor(Rnd * 14) + 1
  1276. 'draw 1000 points of a sinewave
  1277. For i = 1 To 1000
  1278. a = a - 1
  1279. b = b + 1
  1280. X = X + SubX * Cos(a * 3 * 2)
  1281. Y = Y + SubY * Sin(b * 3 * 20)
  1282. Graph.PSet (X, Y), RandomColor
  1283. Next i
  1284. End Sub
  1285. Private Sub Command54_Click()
  1286. Graph.Cls
  1287. redrawgraph
  1288. End Sub
  1289. Private Sub Command6_Click()
  1290. Text1.SelText = CDec(6)
  1291. End Sub
  1292. Private Sub Command7_Click()
  1293. Text1.SelText = CDec(7)
  1294. End Sub
  1295. Private Sub Command8_Click()
  1296. Text1.SelText = CDec(8)
  1297. End Sub
  1298. Private Sub Command9_Click()
  1299. Text1.SelText = CDec(9)
  1300. End Sub
  1301. Private Sub Degrees_Click()
  1302. On Error Resume Next
  1303. If Degrees.Checked = False Then
  1304.     Degrees.Checked = True
  1305.     Radians.Checked = False
  1306. End If
  1307. End Sub
  1308. Private Sub Copy_Click()
  1309. On Error Resume Next
  1310. Clipboard.SetText Text1.Text
  1311. End Sub
  1312. Private Sub Exit_Click()
  1313. On Error Resume Next
  1314. Unload Form1
  1315. Unload Form2
  1316. Set Form1 = Nothing
  1317. Set Form2 = Nothing
  1318. End Sub
  1319. Private Sub Form_Activate()
  1320. 'set the degree option button to true
  1321. Option2 = True
  1322. End Sub
  1323. Private Sub Form_Load()
  1324. On Error Resume Next
  1325. Timer2.Enabled = False
  1326. Timer3.Enabled = False
  1327. Timer4.Enabled = False
  1328. Label1.Visible = False
  1329. Label6.Visible = False
  1330. 'Radians.Checked = True
  1331. SetForeColor Command13, vbGreen
  1332. SetForeColor Command1, vbBlue
  1333. SetForeColor Command2, vbBlue
  1334. SetForeColor Command3, vbBlue
  1335. SetForeColor Command4, vbBlue
  1336. SetForeColor Command5, vbBlue
  1337. SetForeColor Command6, vbBlue
  1338. SetForeColor Command7, vbBlue
  1339. SetForeColor Command8, vbBlue
  1340. SetForeColor Command9, vbBlue
  1341. SetForeColor Command15, vbBlue
  1342. SetForeColor Command16, vbBlue
  1343. SetForeColor Command35, vbBlue
  1344. SetForeColor Command48, &HC000C0
  1345. SetForeColor Command49, &HC000C0
  1346. SetForeColor Command50, &HC000C0
  1347. SetForeColor Command10, vbRed
  1348. SetForeColor Command11, vbRed
  1349. SetForeColor Command12, vbRed
  1350. SetForeColor Command14, vbRed
  1351. SetForeColor Command52, vbRed
  1352. SetForeColor Command53, vbYellow
  1353. 'draw the grid in the graph window
  1354. Graph.Line (Graph.Width / 2, 0)-(Graph.Width / 2, Graph.Height), QBColor(7)
  1355. Graph.Line (0, Graph.Height / 2)-(Graph.Width, Graph.Height / 2), QBColor(7)
  1356. TicColor = QBColor(7)
  1357. For i = 0 To Graph.Width Step 45
  1358. 'horizontal tics
  1359. If i = 450 Or i = 1350 Then
  1360. TicColor = vbRed
  1361. TicColor = QBColor(7)
  1362. End If
  1363. Graph.Line (i, (Graph.Height / 2) + 35)-(i, (Graph.Height / 2) - 35), TicColor
  1364. Next i
  1365. For i = 0 To Graph.Height Step 45
  1366. 'vertical tics
  1367. If i = 450 Or i = 1350 Then
  1368. TicColor = vbRed
  1369. TicColor = QBColor(7)
  1370. End If
  1371. Graph.Line (Graph.Width / 2 + 35, i)-(Graph.Width / 2 - 35, i), TicColor
  1372. Next i
  1373. 'print "horizontal +10"
  1374. Graph.CurrentX = (Graph.Width / 100) * 20
  1375. Graph.CurrentY = (Graph.Height / 100) * 35
  1376. Graph.Print "10"
  1377. 'print "vertical +10"
  1378. Graph.CurrentX = (Graph.Width / 100) * 35
  1379. Graph.CurrentY = (Graph.Height / 100) * 20
  1380. Graph.Print "10"
  1381. 'print "horizontal -10"
  1382. Graph.CurrentX = (Graph.Width / 100) * 70
  1383. Graph.CurrentY = (Graph.Height / 100) * 53
  1384. Graph.Print "-10"
  1385. 'print "vertical -10"
  1386. Graph.CurrentX = (Graph.Width / 100) * 53
  1387. Graph.CurrentY = (Graph.Height / 100) * 70
  1388. Graph.Print "-10"
  1389. 'load subX and subY input values
  1390. SubX = SubXinput.Text
  1391. SubY = SubYinput.Text
  1392. End Sub
  1393. Private Sub Form_QueryUnload(Cancel As Integer, UnloadMode As Integer)
  1394. UnsetForeColor Command13
  1395. UnsetForeColor Command1
  1396. UnsetForeColor Command2
  1397. UnsetForeColor Command3
  1398. UnsetForeColor Command4
  1399. UnsetForeColor Command5
  1400. UnsetForeColor Command6
  1401. UnsetForeColor Command7
  1402. UnsetForeColor Command8
  1403. UnsetForeColor Command9
  1404. UnsetForeColor Command10
  1405. UnsetForeColor Command11
  1406. UnsetForeColor Command12
  1407. UnsetForeColor Command14
  1408. UnsetForeColor Command15
  1409. UnsetForeColor Command16
  1410. UnsetForeColor Command35
  1411. UnsetForeColor Command48
  1412. UnsetForeColor Command49
  1413. UnsetForeColor Command50
  1414. UnsetForeColor Command52
  1415. UnsetForeColor Command53
  1416.     'UnsetForeColor Command2
  1417.     'UnsetForeColor Command3
  1418.     'UnsetForeColor Command4
  1419. End Sub
  1420. Private Sub HelpTopics_Click()
  1421. MsgBox "Some functions use Input Boxes now. I have cleaned up the code slightly and added Sin, Cos and Tan. If you do Sin, Cos or Tan on some small numbers, you may see a minus 2 at the end. This means that you take your answer and move the decimal place 2 places to the left." + vbCrLf + "When you work out fractions, after you have entered all the values, press the + button to add the fractions together, - to take them away, X to times them together or / to divide them. All fraction answers are not given in their simplest form, but still give the correct answer.", vbInformation
  1422. End Sub
  1423. Private Sub Option1_Click()
  1424. Text1.SetFocus
  1425. End Sub
  1426. Private Sub Option2_Click()
  1427. Text1.SetFocus
  1428. End Sub
  1429. Private Sub Paste_Click()
  1430. On Error Resume Next
  1431. Text1 = Clipboard.GetText
  1432. End Sub
  1433. Private Sub Radians_Click()
  1434. On Error Resume Next
  1435. If Degrees.Checked = False Then
  1436.     Degrees.Checked = False
  1437.     Radians.Checked = True
  1438. End If
  1439. End Sub
  1440. Private Sub SubXinput_Change()
  1441. On Error Resume Next
  1442. SubX = SubXinput.Text
  1443. End Sub
  1444. Private Sub SubYinput_Change()
  1445. On Error Resume Next
  1446. SubY = SubYinput.Text
  1447. End Sub
  1448. Private Sub Timer2_Timer()
  1449. Timer2.Enabled = False
  1450. 'Label5.Visible = False
  1451. Text1 = ""
  1452. Label6.Visible = False
  1453. End Sub
  1454. Private Sub Timer3_Timer()
  1455. Timer3.Enabled = False
  1456. 'Label5.Visible = False
  1457. Call Clear_Click
  1458. End Sub
  1459. Private Sub Timer4_Timer()
  1460. Timer4.Enabled = False
  1461. 'Label5.Visible = False
  1462. Text1 = ""
  1463. End Sub
  1464. Public Function CosRad(Text1)
  1465.       
  1466. ' Initialize variables
  1467.    P1 = CDec(1)
  1468.     n = 0
  1469.   Sum = 0
  1470.    dS = CDec(1)
  1471.   Lim = CDec(1E-30)
  1472.     X = CDec(Trim(Text1))
  1473. ' Execute cosine computation loop
  1474.   Do Until Abs(dS) <= Lim
  1475.   dS = P1 * STerm(X, 2 * n)
  1476.   Sum = Sum + dS
  1477.   n = n + 1
  1478.   P1 = -P1
  1479.   Loop
  1480.   CosRad = Sum
  1481. End Function
  1482. Private Function SinRad(Text1)
  1483.       
  1484. ' Initialize variables
  1485.    P1 = CDec(1)
  1486.     n = 0
  1487.   Sum = 0
  1488.    dS = CDec(1)
  1489.   Lim = CDec(1E-29)
  1490.     X = CDec(Trim(Text1))
  1491. ' Execute sine computation loop
  1492.   Do Until Abs(dS) <= Lim
  1493.   dS = P1 * STerm(X, 2 * n + 1)
  1494.   Sum = Sum + dS
  1495.   n = n + 1
  1496.   P1 = -P1
  1497.   Loop
  1498.   SinRad = Sum
  1499. End Function
  1500. Private Function TanRad(Text1)
  1501. Q = CDec(Trim(Text1))
  1502. ' Compute tangent as Sine/Cosine ratio
  1503.   TanRad = SinRad(Q) / CosRad(Q)
  1504. End Function
  1505. Private Function STerm(x_Val, n_Val)
  1506.       X = CDec(x_Val)
  1507.       T = CDec(1)
  1508.   For i = 1 To Val(n_Val)
  1509.       T = T * X / i
  1510.   Next i
  1511.   STerm = T
  1512. End Function
  1513. Private Sub redrawgraph()
  1514. 'redraw the grid in the graph window
  1515. Graph.ScaleMode = 1
  1516. Graph.Line (Graph.Width / 2, 0)-(Graph.Width / 2, Graph.Height), QBColor(7)
  1517. Graph.Line (0, Graph.Height / 2)-(Graph.Width, Graph.Height / 2), QBColor(7)
  1518. TicColor = QBColor(7)
  1519. For i = 0 To Graph.Width Step 45
  1520. 'horizontal tics
  1521. If i = 450 Or i = 1350 Then
  1522. TicColor = vbRed
  1523. TicColor = QBColor(7)
  1524. End If
  1525. Graph.Line (i, (Graph.Height / 2) + 35)-(i, (Graph.Height / 2) - 35), TicColor
  1526. Next i
  1527. For i = 0 To Graph.Height Step 45
  1528. 'vertical tics
  1529. If i = 450 Or i = 1350 Then
  1530. TicColor = vbRed
  1531. TicColor = QBColor(7)
  1532. End If
  1533. Graph.Line (Graph.Width / 2 + 35, i)-(Graph.Width / 2 - 35, i), TicColor
  1534. Next i
  1535. 'print "horizontal +10"
  1536. Graph.CurrentX = (Graph.Width / 100) * 20
  1537. Graph.CurrentY = (Graph.Height / 100) * 35
  1538. Graph.Print "10"
  1539. 'print "vertical +10"
  1540. Graph.CurrentX = (Graph.Width / 100) * 35
  1541. Graph.CurrentY = (Graph.Height / 100) * 20
  1542. Graph.Print "10"
  1543. 'print "horizontal -10"
  1544. Graph.CurrentX = (Graph.Width / 100) * 70
  1545. Graph.CurrentY = (Graph.Height / 100) * 53
  1546. Graph.Print "-10"
  1547. 'print "vertical -10"
  1548. Graph.CurrentX = (Graph.Width / 100) * 53
  1549. Graph.CurrentY = (Graph.Height / 100) * 70
  1550. Graph.Print "-10"
  1551. End Sub
  1552.